package com.lelouch.examplecode.designpattern.adapter;

import org.springframework.data.domain.Sort;

import java.util.Hashtable;
import java.util.Map;

/**
 * @author lcy
 * @create 2018-10-11 14:28
 */
public class AdapterTest {
    public static void main(String[] args) {
        UserInfo userInfo = new UserInfo();
        Map<String,String> userMap = new Hashtable<>();
        userMap.put("username","lcy");
        userMap.put("usertelephone","18205187832");
        userInfo.setUserInfoMap(userMap);

        System.out.println(userInfo.getUserInfoMap().get("username"));
        System.out.println(userInfo.getUserInfoMap().get("usertelephone"));

        UserAdapter userAdapter = new UserAdapter(userInfo);
        System.out.println(userAdapter.getName());
        System.out.println(userAdapter.getTelNumber());
    }
}
